﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WQDSkin.Forms.Controls;

namespace ApiDoc.Admin
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void MainMenuItem_Checked(object sender, RoutedEventArgs e)
        {
            
            Control control = (Control)sender;
            if( control.DataContext != null)
            {
                string uriString = control.DataContext.ToString() + ".xaml";
                Frame.Navigate(new Uri(uriString, UriKind.Relative));
            } 
        }

        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            Frame.Navigate(new Uri("View/Api/Index.xaml", UriKind.Relative));
        }
    }
}
